//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { MinishopOrderDetail, MinishopOrderDetailResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooMinishopOrderDetailList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<MinishopOrderDetailResponse>(`/uctoo/minishop_order_detail/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooMinishopOrderDetail = async (id: string) => {
  return requestClient.get<MinishopOrderDetail>(`/uctoo/minishop_order_detail/${id}`);
};

export const adductooMinishopOrderDetail = async (data: Partial<MinishopOrderDetail>) => {
  return requestClient.post<MinishopOrderDetail>('/uctoo/minishop_order_detail/add', data);
};

export const edituctooMinishopOrderDetail = async (data: Partial<MinishopOrderDetail>) => {
  return requestClient.post<MinishopOrderDetail>('/uctoo/minishop_order_detail/edit', data);
};

export const deleteuctooMinishopOrderDetail = async (id: string) => {
  return requestClient.post<any>('/uctoo/minishop_order_detail/del', { id });
};
